import 'package:aichat_flutter_wallet/module_common/utils/colors.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class DappModalTipsWidget extends StatefulWidget {
  DappModalTipsWidget({super.key, required this.tips});
  String tips;
  @override
  State<DappModalTipsWidget> createState() => _DappModalTipsWidgetState();
}

class _DappModalTipsWidgetState extends State<DappModalTipsWidget> {
  @override
  Widget build(BuildContext context) {
    return Dialog(
      insetPadding: EdgeInsets.all(0),
      backgroundColor: Colors.transparent,
      shadowColor: Colors.transparent,
      surfaceTintColor: Colors.transparent,
      child: UnconstrainedBox(
        child: Container(
          width: 310.w,
          height: 150.w,
          padding: EdgeInsets.only(top: 20.w),
          decoration: BoxDecoration(
              color: Colors.white,
              borderRadius: BorderRadius.circular(8.w),
              boxShadow: [
                BoxShadow(
                    color: Color.fromRGBO(157, 157, 157, 0.18),
                    blurRadius: 12,
                    spreadRadius: 0,
                    offset: Offset(0, 4)),
              ]),
          child: Padding(
            padding: EdgeInsets.only(left: 20.w, right: 20.w),
            child: Column(
              mainAxisSize: MainAxisSize.min,
              children: [
                Text(
                  'Tips',
                  style: TextStyle(
                      fontWeight: FontWeight.w600,
                      fontSize: 14.sp,
                      color: AppColors.c_333333),
                ),
                SizedBox(
                  height: 6.w,
                ),
                Container(
                  height: 34.w,
                  child: Text(
                    widget.tips,
                    textAlign: TextAlign.center,
                    style:
                        TextStyle(fontSize: 12.sp, color: AppColors.c_868391),
                  ),
                ),
                SizedBox(height: 18.w),
                Container(
                  width: double.infinity,
                  height: 1.w,
                  color: AppColors.c_F3F2F7,
                ),
                InkWell(
                    onTap: () {
                      Navigator.of(context).pop(true);
                    },
                    child: Container(
                      width: double.infinity,
                      margin: EdgeInsets.only(top: 14.w),
                      child: Text(
                        'OK',
                        textAlign: TextAlign.center,
                        style: TextStyle(
                            fontSize: 14.sp, color: AppColors.c_8667FE),
                      ),
                    ))
              ],
            ),
          ),
        ),
      ),
    );
  }
}
